home *** CD-ROM | disk | FTP | other *** search
- //////////////////////////////////////////////////////////////////////////////
- //
- // Copyright 1997-2000 Activision Studios, Strategy Group
- //
- // Dark Reign II - Options menu
- //
-
- //
- // Define common shell controls
- //
- ConfigureInterface()
- {
- CreateColorGroup("sys::textureshell", "sys::texture")
- {
- NormalBg(0, 0, 0, 193);
- NormalFg(63, 192, 63);
- HilitedBg(0, 0, 0, 255);
- HilitedFg(100, 255, 100);
- }
- CreateColorGroup("sys::temptextureshell", "sys::texture")
- {
- NormalBg(0, 0, 0, 0);
- NormalFg(63, 192, 0);
- HilitedBg(0, 0, 0, 255);
- HilitedFg(100, 255, 100);
- }
-
- CreateColorGroup("sys::textureshellmain", "Sys::Texture")
- {
- NormalTexture("interface_frame.pic", 0, 0, 128, 128);
- HilitedTexture("interface_frame2.pic", 0, 0, 128, 128);
- SelectedTexture("interface_frame2.pic", 0, 0, 128, 128);
- HilitedSelTexture("interface_frame2.pic", 0, 0, 128, 128);
- DisabledTexture("interface-02.pic", 169, 119, 87, 15);
- }
-
- DefineControlType("ShellMainBigButton", "Button")
- {
- Size(200, 50);
- ColorGroup("sys::textureshellmain");
- Style("!DropShadow");
- Font("AllCaps");
- }
- DefineControlType("ShellMainButton", "Button")
- {
- Size(125, 30);
- ColorGroup("sys::textureshell");
- Image("interface_bar.pic", 0, 0, 123, 30);
- Font("Button");
- }
- DefineControlType("ShellMainSmallButton", "Button")
- {
- Size(116, 30);
- ColorGroup("sys::textureshell");
- Image("interface_bar.pic", 0, 0, 123, 30);
- Font("Button");
- }
- DefineControlType("ShellMainTempButton", "Button")
- {
- Size(125, 30);
- ColorGroup("sys::temptextureshell");
- Style("!DropShadow");
- Image("interface_bar.pic", 0, 0, 123, 30);
- Font("Tiny");
- }
-
- DefineControlType("Class::ShellOptions", "Window")
- {
- ReadTemplate("Class::BaseOptions");
-
- CreateControl("Buttons", "Menu")
- {
- Geometry("Bottom", "Right");
- Pos(-5, -5);
- Style("Horizontal", "NoAutoSize", "!DropShadow", "Transparent");
- MenuEdge(0);
-
- ItemConfig()
- {
- ReadTemplate("Std::Button");
- Font("System");
- Size(160, 25);
- }
-
- AddItem("Exit DR2")
- {
- Text("#shell.win.options.exit");
- TipText("#shell.win.options.exit_tip");
-
- OnEvent("Button::Notify::Pressed")
- {
- MessageBox()
- {
- Title("#standard.confirm.title");
- Message("#standard.confirm.message");
- Button0("#standard.buttons.ok", "Confirmed");
- Button1("#standard.buttons.cancel", "");
- }
- }
-
- OnEvent("Confirmed")
- {
- If("multiplayer.flags.online")
- {
- If("multiplayer.flags.isHost")
- {
- Cmd("multiplayer.migrate");
- Op("$|Multiplayer::Connect.action", "=", "quit");
- Deactivate("<<<<");
- }
- Else()
- {
- Cmd("multiplayer.abort");
- Cmd("quit");
- }
- }
- Else()
- {
- Cmd("quit");
- }
- }
- }
- }
- }
- }
-
- CreateControl("Shell::EventHandler", "Window")
- {
- CreateVarString("control", "");
- CreateVarString("Campaign", "");
-
- OnEvent("CineractiveCompleted")
- {
- Switch("gamegod.flow.state")
- {
- Case("Logout")
- {
- Cmd("sys.runcode login");
- }
- Case("Quit")
- {
- Cmd("quit");
- }
- Case("WON::Return")
- {
- SendNotifyEvent("", "WON::Enter");
- }
- Case("Network::Return")
- {
- SendNotifyEvent("", "Network::Enter");
- }
- }
- Activate("*$.control");
- }
-
- OnEvent("Main::Init")
- {
- Op("multiplayer.flags.inWon", "=", 0);
- Switch("gamegod.flow.action")
- {
- Case("Return")
- {
- Switch("gamegod.flow.state")
- {
- Case("Instant")
- {
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Main::Enter");
- }
- Case("WON")
- {
- Op("$.control", "=", "");
- Op("gamegod.flow.state", "=", "WON::Return");
- Cmd("team.objectives.new s Cineractive::Multi::Return");
- }
- Case("Network")
- {
- Op("$.control", "=", "");
- Op("gamegod.flow.state", "=", "Network::Return");
- Cmd("team.objectives.new s Cineractive::Multi::Return");
- }
- Default()
- {
- SendNotifyEvent("", "Main::Enter");
- }
- }
- }
- Case("Setup")
- {
- Switch("gamegod.flow.state")
- {
- Case("Instant")
- {
- Op("$.control", "=", "|GameSetup::Instant");
- Cmd("team.objectives.new s Cineractive::Multi::Return");
- SendNotifyEvent("|GameSetup::Instant", "GameSetup::Message::Created");
- }
- Default()
- {
- SendNotifyEvent("", "Main::Enter");
- }
- }
- }
- Default()
- {
- SendNotifyEvent("", "Main::Enter");
- }
- }
- }
-
- OnEvent("Main::Enter")
- {
- Op("gamegod.flow.state", "=", "");
- Op("gamegod.flow.action", "=", "");
-
- Con("Diag", "Shell Main::Enter");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Main::Enter");
- }
- OnEvent("Main::Exit")
- {
- Con("Diag", "Shell Main::Exit");
- Deactivate("*$.control");
- Op("$.control", "=", "");
- Cmd("team.objectives.new s Cineractive::Main::Exit");
- }
-
- OnEvent("Campaign::Enter")
- {
- Op("gamegod.flow.state", "=", "Campaign");
-
- Con("Diag", "Shell Campaign::Enter");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Campaign");
- Cmd("team.objectives.new s Cineractive::Campaign::Enter");
- }
- OnEvent("Campaign::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Con("Diag", "Shell Campaign::Exit");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Campaign::Exit");
- }
-
- OnEvent("Campaign::JDA")
- {
- Con("Diag", "Shell Campaign::JDA");
- Deactivate("*$.control");
- Op("$.Campaign", "=", "missions\jda");
- Op("$|Shell::Campaign::Side.campaignName", "=", "missions\jda");
- Op("$.control", "=", "|Shell::Campaign::Side");
- Cmd("team.objectives.new s Cineractive::Campaign::JDA::Enter");
- Activate("|Shell::Campaign::Side");
- Activate("|Shell::JDALogo");
-
- }
-
- OnEvent("Campaign::Sprawler")
- {
- Con("Diag", "Shell Campaign::Sprawler");
- Deactivate("*$.control");
- Op("$.Campaign", "=", "missions\sprawler");
- Op("$|Shell::Campaign::Side.campaignName", "=", "missions\sprawler");
- Op("$.control", "=", "|Shell::Campaign::Side");
- Cmd("team.objectives.new s Cineractive::Campaign::Sprawler::Enter");
- Activate("|Shell::Campaign::Side");
- Activate("|Shell::SprawlerLogo");
-
- }
-
- OnEvent("Campaign::Custom")
- {
- Con("Diag", "Shell Campaign::Custom");
- Deactivate("*$.control");
- Activate("|Shell::Campaign::Custom");
- Op("$.Campaign", "=", "Custom");
- }
-
- OnEvent("Campaign::JDA::Exit")
- {
- Con("Diag", "Shell Campaign::JDA::Exit");
- Deactivate("|Shell::Campaign::Side");
- Deactivate("|Shell::JDALogo");
- Op("$.control", "=", "|Shell::Campaign");
- Cmd("team.objectives.new s Cineractive::Campaign::JDA::Exit");
- }
-
- OnEvent("Campaign::Sprawler::Exit")
- {
- Con("Diag", "Shell Campaign::Sprawler::Exit");
- Deactivate("|Shell::Campaign::Side");
- Deactivate("|Shell::SprawlerLogo");
- Op("$.control", "=", "|Shell::Campaign");
- Cmd("team.objectives.new s Cineractive::Campaign::Sprawler::Exit");
- }
-
- OnEvent("Campaign::Custom::Exit")
- {
- Con("Diag", "Shell Campaign::Custom::Exit");
- Deactivate("|Shell::Campaign::Custom");
- Activate("|Shell::Campaign");
- }
-
- OnEvent("Load::Enter")
- {
- Con("Diag", "Shell Load::Enter");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Load");
- Cmd("team.objectives.new s Cineractive::Load::Enter");
- }
-
- OnEvent("Load::Exit")
- {
- Con("Diag", "Shell Load::Exit");
- Deactivate("|Shell::Load");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Load::Exit");
- }
-
- OnEvent("Instant::Enter")
- {
- Op("gamegod.flow.state", "=", "Instant");
-
- Con("Diag", "Shell Instant::Enter");
- Deactivate("*$.control");
- Op("$.control", "=", "|GameSetup::Instant");
- Cmd("team.objectives.new s Cineractive::Multi::Enter");
- SendNotifyEvent("|GameSetup::Instant", "GameSetup::Message::Created");
- }
- OnEvent("Instant::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Con("Diag", "Shell Instant::Exit");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Multi::Exit");
- }
-
- OnEvent("Multi::Enter")
- {
- Op("gamegod.flow.state", "=", "Multiplayer");
-
- Con("Diag", "Shell Multi::Enter");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Multi");
- Cmd("team.objectives.new s Cineractive::Multi::Enter");
- }
- OnEvent("Multi::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Con("Diag", "Shell Multi::Exit");
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Multi::Exit");
- }
-
- OnEvent("Replay::Enter")
- {
- Op("gamegod.flow.state", "=", "Replay");
-
- Deactivate("*$.control");
- Activate("|Shell::Replay");
- }
-
- OnEvent("Replay::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Deactivate("|Shell::Replay");
- Activate("|Shell::Main");
- }
-
- OnEvent("Options::Enter")
- {
- Op("gamegod.flow.state", "=", "Options");
-
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Options");
- Cmd("team.objectives.new s Cineractive::Options::Enter");
- }
- OnEvent("Options::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Options::Exit");
- }
-
- OnEvent("Credits::Enter")
- {
- Op("gamegod.flow.state", "=", "Credits");
-
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Credits");
- Cmd("team.objectives.new s Cineractive::Credits::Enter");
- }
- OnEvent("Credits::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Deactivate("*$.control");
- Op("$.control", "=", "|Shell::Main");
- Cmd("team.objectives.new s Cineractive::Credits::Exit");
- }
-
- OnEvent("WON::Enter")
- {
- Op("gamegod.flow.state", "=", "WON");
- Op("multiplayer.flags.inWon", "=", 1);
-
- Con("Diag", "Shell WON::Enter");
- Deactivate("*$.control");
- Op("$.control", "=", "");
-
- If("multiplayer.flags.update", "==", 0)
- {
- Op("multiplayer.flags.update", "=", 1);
- Cmd("multiplayer.download.updates");
- Activate("|Multiplayer::Updates");
- }
- Else()
- {
- ConConvert("Won", "Won::Old");
- Con("Won", "#won.connect.lookup");
- Activate("|WonConnect");
- Cmd("won.setup");
- Op("$|WonConnect.state", "=", "Connect");
- Op("$|WonConnect.autologin", "=", 1);
- }
- }
- OnEvent("WON::Exit")
- {
- Op("gamegod.flow.state", "=", "");
- Op("multiplayer.flags.inWon", "=", 0);
-
- Con("Diag", "Shell WON::Exit");
- Op("$.control", "=", "|Shell::Multi");
- Activate("*$.control");
- }
- OnEvent("WON::Back")
- {
- Op("gamegod.flow.state", "=", "WON");
-
- Con("Diag", "Shell WON::Back");
- Op("$.control", "=", "");
- Activate("|WonSetup");
- }
-
- OnEvent("Network::Enter")
- {
- Op("gamegod.flow.state", "=", "Network");
-
- Con("Diag", "Shell Network::Enter");
- Deactivate("*$.control");
- Activate("|MultiPlayer::Sessions");
- }
- OnEvent("Network::Exit")
- {
- Op("gamegod.flow.state", "=", "");
-
- Con("Diag", "Shell Network::Exit");
- Op("$.control", "=", "|Shell::Multi");
- Activate("*$.control");
- }
-
- OnEvent("Setup::Back")
- {
- Con("Diag", "Shell Setup::Back");
-
- Switch("gamegod.flow.state")
- {
- Case("Instant")
- {
- SendNotifyEvent("", "Instant::Exit");
- }
- Case("WON")
- {
- SendNotifyEvent("", "WON::Back");
- }
- Case("Network")
- {
- SendNotifyEvent("", "Network::Enter");
- }
- }
- }
- }
-
- CreateControl("Shell::Main", "Window")
- {
- Style("Transparent", "!DropShadow");
- Geometry("ParentWidth", "ParentHeight");
-
- CreateControl("CampaignSelection", "Game::CampaignSelection")
- {
- ReadTemplate("Std::WindowNoTitle");
- Style("AdjustWindow", "NoSysButtons");
- // Text("Dark Reign 2 Demo");
- Size(230, 120);
- Geometry("HCentre", "VCentre");
- Pos(0, -30);
-
- CreateControl("CampaignDropListTitle", "Static")
- {
- Font("System");
- // Pos(15, 5);
- Pos(0, 1500);
- Size(200, 20);
- Style("Transparent");
- JustifyText("Left");
- Text("#shell.win.campaign.select");
- }
-
- CreateControl("CampaignDropList", "DropList")
- {
- Align("^");
- Geometry("HInternal", "Bottom");
- ReadRegData("Reg::Std::DropList");
- Pos(0, 5);
- Size(200, 20);
- Height(170);
-
- UseVar("$<.campaignName");
-
- ListBox("ListBox")
- {
- ReadTemplate("Std::SliderListBox");
- Geometry("ParentWidth", "ParentHeight");
- ItemConfig()
- {
- Font("System");
- Geometry("AutoSizeY", "ParentWidth");
- }
- }
- }
-
- CreateControl("MissionDropListTitle", "Static")
- {
- // Align("^");
- // Geometry("HInternal", "Bottom");
- Style("Transparent");
- // Pos(0, 5);
- Pos(15, 5);
- Size(200, 20);
- Font("System");
- JustifyText("Left");
- Text("#shell.win.campaign.next");
- }
-
- CreateControl("MissionDropList", "DropList")
- {
- Align("^");
- ReadRegData("Reg::Std::DropList");
- Geometry("HInternal", "Bottom");
- Pos(0, 5);
- Size(200, 20);
- Height(60);
-
- UseVar("$<.missionName");
-
- ListBox("ListBox")
- {
- ReadTemplate("Std::SliderListBox");
- Geometry("ParentWidth", "ParentHeight");
- ItemConfig()
- {
- Font("System");
- Geometry("AutoSizeY", "ParentWidth");
- }
- }
- }
-
- CreateControl("DifficultyDropListTitle", "Static")
- {
- Align("^");
- Geometry("HInternal", "Bottom");
- Style("Transparent");
- Pos(0, 5);
- Size(200, 20);
- Font("System");
- JustifyText("Left");
- Text("#shell.win.campaign.difficulty");
- }
-
- CreateControl("DifficultyDropList", "DropList")
- {
- Align("^");
- ReadRegData("Reg::Std::DropList");
- Geometry("HInternal", "Bottom");
- Pos(0, 5);
- Size(200, 20);
- Height(60);
-
- UseVar("$<.difficulty");
-
- ListBox("Game::DifficultyList")
- {
- ReadTemplate("Std::SliderListBox");
- ItemConfig()
- {
- Font("System");
- Geometry("AutoSizeY", "ParentWidth");
- }
- }
- }
-
- OnEvent("Window::Notify::Activated")
- {
- DisableRecurse("CampaignDropList");
- }
- }
-
- CreateControl("Launch", "ShellMainBigButton")
- {
- Align("^");
- Geometry("HInternal", "HCentre", "Bottom");
- Pos(0, 20);
- Text("#shell.buttons.load");
- TranslateEvent("Button::Notify::Pressed", "Game::CampaignSelection::Message::Load", "<CampaignSelection");
- }
-
- CreateControl("LoadGame", "ShellMainButton")
- {
- // Align("<Launch");
- Geometry("Bottom", "HCentre");
- Pos(-200, -10);
- Text("#shell.win.options.saveload.title");
- TranslateEvent("Button::Notify::Pressed", "Load::Enter", "|Shell::EventHandler");
- }
-
- CreateControl("Options", "ShellMainButton")
- {
- // Align("<Launch");
- Geometry("Bottom", "HCentre");
- Pos(0, -10);
- Text("#shell.buttons.cfg");
- TranslateEvent("Button::Notify::Pressed", "Options::Enter", "|Shell::EventHandler");
- }
-
- CreateControl("Quit", "ShellMainButton")
- {
- Pos(200, -10);
- Geometry("Bottom", "HCentre");
- Text("#standard.buttons.quit");
- OnEvent("Button::Notify::Pressed")
- {
- Cmd("quit");
- }
- }
-
- CreateControl("Activision", "Static")
- {
- Size(128, 128);
- Pos(5, 40);
- ColorGroup("sys::texture");
- Image("interface_activision_logo.pic");
- }
-
- CreateControl("Dr2", "Static")
- {
- Size(256, 256);
- Pos(0, -50);
- Geometry("HCentre");
- ColorGroup("sys::texture");
- Image("dr2-logo_2.pic");
- }
-
- CreateControl("Pandemic", "Static")
- {
- Size(128, 128);
- Geometry("Right");
- Pos(25, 5);
- ColorGroup("sys::texture");
- Image("interface_pandemic_logo.pic");
- }
- }
-
-
- CreateControl("Shell::Load", "Window")
- {
- Style("Transparent", "!DropShadow");
- Geometry("ParentWidth", "ParentHeight");
-
- CreateControl("LoadWindow", "Window")
- {
- ReadTemplate("Std::Window");
- Text("#shell.win.load.title");
- Size(500, 400);
- Geometry("HCentre", "VCentre");
- Style("TitleBar", "AdjustWindow", "NoSysButtons");
-
- CreateControl("Tabs", "Class::OptionsTabGroup")
- {
- Add("SaveLoad", "Class::SaveLoad")
- {
- ReadTemplate("Std::Client");
- }
- }
-
- CreateControl("ReturntoMain", "ShellMainButton")
- {
- Pos(-10, -10);
- Geometry("Bottom", "Right");
- Text("#shell.buttons.mainmenu");
- TranslateEvent("Button::Notify::Pressed", "Load::Exit", "|Shell::EventHandler");
- }
- }
- }
-
-
- CreateControl("Shell::Options", "Window")
- {
- Style("Transparent", "!DropShadow");
- Geometry("ParentWidth", "ParentHeight");
-
- CreateControl("Options", "Window")
- {
- ReadTemplate("Std::Window");
- Text("#shell.win.options.title");
- Size(500, 400);
- Geometry("HCentre", "VCentre");
- Style("TitleBar", "AdjustWindow", "NoSysButtons");
-
- CreateControl("Tabs", "Class::OptionsTabGroup")
- {
- Add("Gameplay", "Class::ShellOptions")
- {
- ReadTemplate("Std::Client");
- }
- Add("Video", "Class::VideoOptions")
- {
- ReadTemplate("Std::Client");
- }
- Add("Sound", "Class::SoundOptions")
- {
- ReadTemplate("Std::Client");
- }
- }
-
- CreateControl("Selector", "Class::OptionsSelector")
- {
- AddItem("Gameplay")
- {
- Text("#shell.win.options.gameplay.gameplay");
- TranslateEvent("Button::Notify::Pressed", "TabGroup::Message::Select", "<<Tabs", "Gameplay");
- }
- AddItem("Video")
- {
- Text("#shell.win.options.video.video");
- TranslateEvent("Button::Notify::Pressed", "TabGroup::Message::Select", "<<Tabs", "Video");
- }
- AddItem("Sound")
- {
- Text("#shell.win.options.sound.sound");
- TranslateEvent("Button::Notify::Pressed", "TabGroup::Message::Select", "<<Tabs", "Sound");
- }
- }
-
- CreateControl("ReturntoMain", "ShellMainButton")
- {
- Pos(-10, -10);
- Geometry("Bottom", "Right");
- Text("#shell.buttons.mainmenu");
- TranslateEvent("Button::Notify::Pressed", "Options::Exit", "|Shell::EventHandler");
- }
- }
- }
-
-
-